package com.pernix.authen;
import com.pernix.authen.model.AuthenResult;
import com.pernix.authen.network.AuthenClient;
import com.pernix.authen.ui.LogOnDialog;
import com.pernix.log.ILog;

public class MSChapAuthen {
	public static AuthenResult Authen(LogOnDialog logOnDialog, ILog logger) {
		AuthenResult userInput = logOnDialog.getAuthenResult();
		AuthenClient authenClient = new AuthenClient(logger, userInput.getServerName(), 1812);
		boolean authenResult = authenClient.Authen(userInput.getUsername(), userInput.getPassword());
		userInput.setAuthenSuccess(authenResult);
		return userInput;
	}

}
